print('='*100)
#上输出
i=1
while i<10:
    x=9-i
    while x>0:
        print("        ", end='')
        x-=1
    j=i
    while j>0:
        print('{0}X{1}={2:<2d}  '.format(j, i, j * i), end='')
        j-=1
    print()
    i+=1
#分割线
print('='*100)
#下输出
i=9
while i>0:
    x=0
    while x<(9-i):
        print('        ', end='')
        x+=1
    j=i
    while j>0:
        print('{0}X{1}={2:<2d}  '.format(j, i, j * i), end='')
        j-=1
    print()
    i-=1
#分割线
print('='*100)